package pt.utl.ist.project_ccu;

import java.util.HashMap;

import pt.utl.ist.project_ccu.android_libs.SavedData;
import pt.utl.ist.project_ccu.android_libs.TagManager;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.widget.Button;

public class MainActivity extends Activity {

	HashMap<String,Button> buttons;
	Button buttonupleft;
	Button buttonupright;
	Button buttondownleft;
	Button buttondownright;

	@SuppressWarnings("static-access")
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		SavedData.getInstance().initInstance(this);
		setContentView(R.layout.activity_main);
		setupButtons();
	}

	public void setupButtons(){
		buttons = new HashMap<String,Button>();

		buttonupleft = (Button) findViewById(R.id.buttonupleft);
		buttonupright = (Button) findViewById(R.id.buttonupright);
		buttondownleft = (Button) findViewById(R.id.buttondownleft);
		buttondownright = (Button) findViewById(R.id.buttondownright);

		buttons.put("buttonupleft", buttonupleft);
		buttons.put("buttonupright", buttonupright);
		buttons.put("buttondownleft", buttondownleft);
		buttons.put("buttondownright", buttondownright);

		buttonupleft.setOnClickListener(new OnClickListener() {

			public void onClick(View arg0) {
				startActivity(new Intent (getApplicationContext(), PhotosAddScreen.class));
			}
		}); 


		buttonupright.setOnClickListener(new OnClickListener() {

			public void onClick(View arg0) {
				startActivity(new Intent (getApplicationContext(), AlbumViewer.class));
			}
		});

		buttondownleft.setOnClickListener(new OnClickListener() {

			public void onClick(View arg0) {
				startActivity(new Intent (getApplicationContext(), SearchPhotos.class));
			}
		});

		buttondownright.setOnClickListener(new OnClickListener() {

			public void onClick(View arg0) {
				startActivity(new Intent (getApplicationContext(), Help.class));
			}
		});

	}
}
